/*
import 'dart:async';

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/scheduler.dart';
import 'package:m_chatroom/src/template/barrage/barrage_list_model.dart';
import 'package:m_chatroom/src/template/barrage/barrage_item_builder.dart';
import 'package:provider/provider.dart';
import '../../interface/root_proxy_model.dart';

class BarrageList extends StatefulWidget {
  BarrageListModel model;

  BarrageList({super.key, required this.model});

  @override
  State<BarrageList> createState() => _BarrageListState();
}

class _BarrageListState extends State<BarrageList> {

  @override
  void initState() {
    super.initState();
  }

  BarrageListModel get model => widget.model;

  /// 安全提示
  Widget get notice => SliverToBoxAdapter(
    child: GestureDetector(
      onTap: () {
        model.jumpBottom();
      },
      child: Container(
        height: 75,
        padding:
        const EdgeInsets.symmetric(horizontal: 8, vertical: 7),
        decoration: BoxDecoration(
          color: const Color(0xFFFFFFFF)
              .withAlpha((255 * 0.08).toInt()),
          borderRadius: BorderRadius.all(Radius.circular(8)),
        ),
        child: Text(
          "${model.notice}",
          style: const TextStyle(
            color: Color(0xff29EEAA),
            fontWeight: FontWeight.w400,
            fontSize: 11,
          ),
        ),
      ),
    ),
  );

  /// 公屏list
  Widget get list => SliverList(
        delegate: SliverChildBuilderDelegate((context, index) {
          var reversedIndex = index;
          return RoomMessageItemBuilder(
            callBack: (value) {
              // 这里添加点击回调信息
              if (value != null && model.channelId != null) {
                model.getSimpleUserShow(
                    value, model.channelId!, context);
              }
            },
          ).buildRow(
              context, model.socketDataList[reversedIndex], reversedIndex);
        }, childCount: model.socketDataList.length),
      );

  Widget get body => CustomScrollView(
    reverse: true,
    shrinkWrap: true,
    slivers: [
      list,
      notice,
    ],
  );

  @override
  Widget build(BuildContext context) {
    return ChangeNotifierProvider.value(
      value: model,
      child: Consumer<BarrageListModel>(
        builder: (_, model, child) {
          return Padding(
            padding: const EdgeInsets.only(left: 16, right: 16),
            child: body,
          );
        },
      ),
    );
  }
}
*/
